const routes = [
    {path: '/Login', component:resolve=>( require(["./components/admin/LoginComponent"],resolve))},
    {
        path: '/',
        component: resolve=>( require(["./components/admin/HomeComponent"],resolve)),
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
        },
        children: [
            {
                name:'dashboard',
                path: '/',
                component: resolve=>(require(["./components/admin/DashComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
            {
                name:'admin',
                path: '/admin',
                component: resolve=>(require(["./components/admin/AdminComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
            {
                name:'cate',
                path: '/cate',
                component: resolve=>(require(["./components/admin/CateComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
            {
                name:'resource',
                path: '/resource',
                component: resolve=>(require(["./components/admin/ResourceComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
            {
                name:'group',
                path: '/group',
                component: resolve=>(require(["./components/admin/GroupComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
            {
                name:'article',
                path: '/article',
                component:resolve=>(require(["./components/admin/ArticleComponent"],resolve)),
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                },
            },
        ]
    },

]

export default routes;